package v1

//下面最基础的gin路由注册方式，适用于路由条目比较少的简单项目或者项目demo。
import (
	"github.com/gin-gonic/gin"
	"log"
	"net/http"
)

func helloHandler(c *gin.Context) {
	c.IndentedJSON(http.StatusOK, gin.H{
		"message": "ok",
	})
}
func main() {
	r := gin.Default()
	r.GET("/hello", helloHandler)
	log.Fatal(r.Run())
}
